home *** CD-ROM | disk | FTP | other *** search
/ Sounds Terrific 1 / Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso / modules / w / wolvrne2.mod < prev    next >
Encoding:
Text File  |  1994-08-04  |  4.6 KB  |  148 lines

  1. A mod for party info.
  2. Wolverine #1 @8130
  3. Mon Dec 09 03:26:44 1991
  4. 7[ 1Message Status 7]: 4Reply is optional
  5. 1«3≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡1»
  6. ┌────────────────────────────────────────────────────────────────────────────┐
  7. │ Mod Name: WOLVRNE2.MOD               Mod Author: Wolverine 1@8130          │
  8. │ Difficulty: Easy                        Date: December 1, 1991             │
  9. │ WWIV Version: v4.20, and others                                            │
  10. │ Description: A better //PARTY mod, with more capabilities!!!               │
  11. │                                                                            │
  12. └────────────────────────────────────────────────────────────────────────────┘
  13.  
  14.     I originally found a variation of this mod, called the Fool Mod, written
  15. by Dude(1@13120).  It was a good mod, but it can really piss off some users,
  16. and also that users or specific people couldn't edit the PARTY.MSG file.
  17. That's where I come in...  I have used his base code to give me the beginning
  18. and from there I have added in some nicer features.  First, it can be sysop
  19. selectable for what security level can add to the party message.  Second, it
  20. allows users to use the WWIV colors.
  21.  
  22. Step .5  As Normal!!!
  23. =====================
  24.  
  25. 6 BACKUP YOUR BLOODY SOURCE!!!!
  26. If you don't know how then learn how quickly...
  27.  
  28. For L'Harc v2.11:  lha u a:source.lzh c:\source\*.*
  29.  
  30.  
  31. Step 1:  FCNS.H
  32. ===============
  33.  
  34. Under the BBSUTL.C section in FCNS.H file, add the following declaration:
  35.  
  36. int checkcomp(char *s);
  37. void party();
  38.  
  39. Step 2:  BBSUTL.C
  40. =================
  41.  
  42. Add the following void right after int checkcomp(char *s)....
  43.  
  44. void party()
  45. {
  46.    int i,i1,f;
  47.    char s[81],l[11][81];
  48.  
  49.    pl("Now for a Current Party Report!!!");
  50.    nl(); nl();
  51.    printfile("PARTY.MSG");
  52.    printfile("PARTY1.MSG");
  53.    nl();
  54.    if thisuser.sl<30    /* Change to whatever you would want */
  55.      prt(5,"Would you like to add to the party report? ");
  56.    if(yn()) {
  57.      outchr(12);
  58.      nl();
  59.      pl("Enter your report, you have 20 lines and 70 char. per line:");
  60.      nl();
  61.      for (i=0; i<20; i++) {
  62.        npr("%d=>",i+1);
  63.        inli(&(l[i][0]),s,71,1);
  64.        strcat(&(l[i][0]),"\r\n");
  65.      }
  66.      nl();
  67.      ansic(1);
  68.      prt(5,"Will this work? ");
  69.      if (yn()) {
  70.        save_status();
  71.        sprintf(s,"%sPARTY1.MSG",syscfg.gfilesdir);
  72.     f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
  73.     strcpy(s,nam(&thisuser,usernum));
  74.     strcat(s,"\r\n");
  75.     write(f,(void *)s,strlen(s));
  76.     for (i=0; i<21; i++)
  77.       write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
  78.     sysoplog("Changed Party Report");
  79.     for (i=0; i<21; i++) {
  80.       strcpy(s,"   ");
  81.       l[i][strlen(&(l[i][0]))-2]=0;
  82.       strcat(s,&(l[i][0]));
  83.       sysoplog(s);
  84.     }
  85.     nl();
  86.     pl("Saving...");
  87.     nl();
  88.     close(f);
  89.   }
  90.  }
  91. }
  92.  
  93. Step 3:  BBS.C
  94. ==============
  95.  
  96. Now go down to void mainmenu(...), and search down until you find:
  97.  
  98.   if (strcmp(s,"CLS")==0)
  99.     outstr("\x0c");
  100.  
  101. then add in the following lines:
  102.  
  103. if (strcmp(s,"PARTY")==0)
  104.   party();
  105.  
  106. Step 4:  LILO.C (Or UTILITY.C, for 4.12 and down, I think)
  107. ==========================================================
  108.  
  109. Go down to void logon(...), and search down until you find:
  110.  
  111.   if (live_user)
  112.     read_automessage();
  113.  
  114. then add the following lines if you would like:
  115.  
  116. nl(); nl();
  117. pl("If you need a party report, then type //PARTY at the main prompt.");
  118. nl();
  119.  
  120. Step 5:  The End!
  121. =================
  122.  
  123. Now all you need to do is type "make" from the dos prompt, or however you may
  124. do it, and sit back and grab a drink.  Also add the "//PARTY" command to the
  125. main menu.  If you like the mod, then let me know, and if you can find a way
  126. to make it better, then let me know, because I would really like to get to
  127. know C and it's functions better than I do now.
  128.  
  129.  
  130. Standard Disclaimer:
  131. ====================
  132.  
  133.      If it doesn't work for you, then you should've backed up your source, so
  134. don't blame me!  I am pretty new at this, so don't be too mad that I stole some
  135. code here and there, at least I am trying to give credit where credit is due.
  136.  
  137.      Thanks to Dude(1@13120), and to Wayne Bell for helping me to understand
  138. that not all good programmers work inline!
  139.  
  140.  
  141.      Wolverine 1@8130 WWIVNet & User #12 on Awesome's Place(WWIVLink)
  142.      Madripoor Island BBS - (801)393-5701 - Supporting the IBM & Amiga
  143. 9
  144. 9
  145. 8C├─ Madripoor Island BBS ┼ WWIVNet @8130 ┼A
  146. 7C Supporting IBM & Amiga Files 
  147. C└ (801)393-5701 
  148. 6